<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>EggLoader - Documentation</title>

    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/ionicons.min.css">
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav>
    <h2><a href="index.html">Home</a></h2>
  <h3>Egg</h3>
  <ul>
    <li>
      <a href="Egg.html">Egg</a>
      <a href="Application.html">Application</a>
      <a href="Context.html">Context</a>
      <a href="Request.html">Request</a>
      <a href="Response.html">Response</a>
    </li>
  </ul>
  <h3>Classes</h3><ul><li><a href="Agent.html">Agent</a><ul class='members'><li data-type='member'><a href="Agent.html#coreLogger">coreLogger</a></li><li data-type='member'><a href="Agent.html#env">env</a></li><li data-type='member'><a href="Agent.html#httpclient">httpclient</a></li><li data-type='member'><a href="Agent.html#logger">logger</a></li><li data-type='member'><a href="Agent.html#loggers">loggers</a></li><li data-type='member'><a href="Agent.html#messenger">messenger</a></li><li data-type='member'><a href="Agent.html#proxy">proxy</a></li><li data-type='member'><a href="Agent.html#addSingleton">addSingleton()</a></li><li data-type='member'><a href="Agent.html#cluster">cluster()</a></li><li data-type='member'><a href="Agent.html#curl">curl()</a></li><li data-type='member'><a href="Agent.html#getLogger">getLogger()</a></li><li data-type='member'><a href="Agent.html#inspect">inspect()</a></li></ul></li><li><a href="AgentWorkerLoader.html">AgentWorkerLoader</a><ul class='members'><li data-type='member'><a href="AgentWorkerLoader.html#loadConfig">loadConfig()</a></li></ul></li><li><a href="AppInfo.html">AppInfo</a><ul class='members'><li data-type='member'><a href="AppInfo.html#baseDir">baseDir</a></li><li data-type='member'><a href="AppInfo.html#env">env</a></li><li data-type='member'><a href="AppInfo.html#HOME">HOME</a></li><li data-type='member'><a href="AppInfo.html#name">name</a></li><li data-type='member'><a href="AppInfo.html#pkg">pkg</a></li><li data-type='member'><a href="AppInfo.html#root">root</a></li><li data-type='member'><a href="AppInfo.html#scope">scope</a></li></ul></li><li><a href="Application.html">Application</a><ul class='members'><li data-type='member'><a href="Application.html#coreLogger">coreLogger</a></li><li data-type='member'><a href="Application.html#createAnonymousContext">createAnonymousContext</a></li><li data-type='member'><a href="Application.html#env">env</a></li><li data-type='member'><a href="Application.html#Helper">Helper</a></li><li data-type='member'><a href="Application.html#httpclient">httpclient</a></li><li data-type='member'><a href="Application.html#keys">keys</a></li><li data-type='member'><a href="Application.html#locals">locals</a></li><li data-type='member'><a href="Application.html#logger">logger</a></li><li data-type='member'><a href="Application.html#loggers">loggers</a></li><li data-type='member'><a href="Application.html#messenger">messenger</a></li><li data-type='member'><a href="Application.html#proxy">proxy</a></li><li data-type='member'><a href="Application.html#view">view</a></li><li data-type='member'><a href="Application.html#addSingleton">addSingleton()</a></li><li data-type='member'><a href="Application.html#cluster">cluster()</a></li><li data-type='member'><a href="Application.html#createContext">createContext()</a></li><li data-type='member'><a href="Application.html#curl">curl()</a></li><li data-type='member'><a href="Application.html#getLogger">getLogger()</a></li><li data-type='member'><a href="Application.html#inspect">inspect()</a></li><li data-type='member'><a href="Application.html#runInBackground">runInBackground()</a></li></ul></li><li><a href="AppWorkerLoader.html">AppWorkerLoader</a><ul class='members'><li data-type='member'><a href="AppWorkerLoader.html#load">load()</a></li><li data-type='member'><a href="AppWorkerLoader.html#loadConfig">loadConfig()</a></li></ul></li><li><a href="global.html#BaseContextClass">BaseContextClass</a><ul class='members'><li data-type='member'><a href="global.html#BaseContextClass#app">app</a></li><li data-type='member'><a href="global.html#BaseContextClass#config">config</a></li><li data-type='member'><a href="global.html#BaseContextClass#ctx">ctx</a></li><li data-type='member'><a href="global.html#BaseContextClass#service">service</a></li></ul></li><li><a href="BaseContextLogger.html">BaseContextLogger</a><ul class='members'><li data-type='member'><a href="BaseContextLogger.html#ctx">ctx</a></li><li data-type='member'><a href="BaseContextLogger.html#debug">debug</a></li><li data-type='member'><a href="BaseContextLogger.html#error">error</a></li><li data-type='member'><a href="BaseContextLogger.html#info">info</a></li><li data-type='member'><a href="BaseContextLogger.html#warn">warn</a></li></ul></li><li><a href="Config.html">Config</a><ul class='members'><li data-type='member'><a href="Config.html#baseDir">baseDir</a></li><li data-type='member'><a href="Config.html#bodyParser">bodyParser</a></li><li data-type='member'><a href="Config.html#cluster">cluster</a></li><li data-type='member'><a href="Config.html#confusedConfigurations">confusedConfigurations</a></li><li data-type='member'><a href="Config.html#development">development</a></li><li data-type='member'><a href="Config.html#dump">dump</a></li><li data-type='member'><a href="Config.html#env">env</a></li><li data-type='member'><a href="Config.html#HOME">HOME</a></li><li data-type='member'><a href="Config.html#hostHeaders">hostHeaders</a></li><li data-type='member'><a href="Config.html#httpclient">httpclient</a></li><li data-type='member'><a href="Config.html#i18n">i18n</a></li><li data-type='member'><a href="Config.html#ipHeaders">ipHeaders</a></li><li data-type='member'><a href="Config.html#jsonp">jsonp</a></li><li data-type='member'><a href="Config.html#keys">keys</a></li><li data-type='member'><a href="Config.html#logger">logger</a></li><li data-type='member'><a href="Config.html#logrotator">logrotator</a></li><li data-type='member'><a href="Config.html#meta">meta</a></li><li data-type='member'><a href="Config.html#middleware">middleware</a></li><li data-type='member'><a href="Config.html#multipart">multipart</a></li><li data-type='member'><a href="Config.html#name">name</a></li><li data-type='member'><a href="Config.html#notfound">notfound</a></li><li data-type='member'><a href="Config.html#onClientError">onClientError</a></li><li data-type='member'><a href="Config.html#pkg">pkg</a></li><li data-type='member'><a href="Config.html#protocolHeaders">protocolHeaders</a></li><li data-type='member'><a href="Config.html#proxy">proxy</a></li><li data-type='member'><a href="Config.html#rundir">rundir</a></li><li data-type='member'><a href="Config.html#security">security</a></li><li data-type='member'><a href="Config.html#siteFile">siteFile</a></li><li data-type='member'><a href="Config.html#static">static</a></li><li data-type='member'><a href="Config.html#view">view</a></li><li data-type='member'><a href="Config.html#watcher">watcher</a></li><li data-type='member'><a href="Config.html#.workerStartTimeout">workerStartTimeout</a></li></ul></li><li><a href="Context.html">Context</a><ul class='members'><li data-type='member'><a href="Context.html#accept">accept</a></li><li data-type='member'><a href="Context.html#acceptJSON">acceptJSON</a></li><li data-type='member'><a href="Context.html#coreLogger">coreLogger</a></li><li data-type='member'><a href="Context.html#helper">helper</a></li><li data-type='member'><a href="Context.html#ip">ip</a></li><li data-type='member'><a href="Context.html#locale">locale</a></li><li data-type='member'><a href="Context.html#locals">locals</a></li><li data-type='member'><a href="Context.html#logger">logger</a></li><li data-type='member'><a href="Context.html#params">params</a></li><li data-type='member'><a href="Context.html#queries">queries</a></li><li data-type='member'><a href="Context.html#realStatus">realStatus</a></li><li data-type='member'><a href="Context.html#router">router</a></li><li data-type='member'><a href="Context.html#starttime">starttime</a></li><li data-type='member'><a href="Context.html#view">view</a></li><li data-type='member'><a href="Context.html#__">__()</a></li><li data-type='member'><a href="Context.html#curl">curl()</a></li><li data-type='member'><a href="Context.html#getFileStream">getFileStream()</a></li><li data-type='member'><a href="Context.html#gettext">gettext()</a></li><li data-type='member'><a href="Context.html#multipart">multipart()</a></li><li data-type='member'><a href="Context.html#redirect">redirect()</a></li></ul></li><li><a href="ContextLoader.html">ContextLoader</a><ul class='members'><li data-type='member'><a href="ContextLoader.html#load">load()</a></li><li data-type='member'><a href="ContextLoader.html#parse">parse()</a></li></ul></li><li><a href="global.html#Controller">Controller</a><ul class='members'><li data-type='member'><a href="global.html#Controller#app">app</a></li><li data-type='member'><a href="global.html#Controller#config">config</a></li><li data-type='member'><a href="global.html#Controller#ctx">ctx</a></li><li data-type='member'><a href="global.html#Controller#service">service</a></li></ul></li><li><a href="EggApplication.html">EggApplication</a><ul class='members'><li data-type='member'><a href="EggApplication.html#BaseContextClass">BaseContextClass</a></li><li data-type='member'><a href="EggApplication.html#baseDir">baseDir</a></li><li data-type='member'><a href="EggApplication.html#config">config</a></li><li data-type='member'><a href="EggApplication.html#Controller">Controller</a></li><li data-type='member'><a href="EggApplication.html#coreLogger">coreLogger</a></li><li data-type='member'><a href="EggApplication.html#deprecate">deprecate</a></li><li data-type='member'><a href="EggApplication.html#env">env</a></li><li data-type='member'><a href="EggApplication.html#httpclient">httpclient</a></li><li data-type='member'><a href="EggApplication.html#loader">loader</a></li><li data-type='member'><a href="EggApplication.html#logger">logger</a></li><li data-type='member'><a href="EggApplication.html#loggers">loggers</a></li><li data-type='member'><a href="EggApplication.html#messenger">messenger</a></li><li data-type='member'><a href="EggApplication.html#name">name</a></li><li data-type='member'><a href="EggApplication.html#plugins">plugins</a></li><li data-type='member'><a href="EggApplication.html#proxy">proxy</a></li><li data-type='member'><a href="EggApplication.html#router">router</a></li><li data-type='member'><a href="EggApplication.html#Service">Service</a></li><li data-type='member'><a href="EggApplication.html#type">type</a></li><li data-type='member'><a href="EggApplication.html#addSingleton">addSingleton()</a></li><li data-type='member'><a href="EggApplication.html#beforeClose">beforeClose()</a></li><li data-type='member'><a href="EggApplication.html#beforeStart">beforeStart()</a></li><li data-type='member'><a href="EggApplication.html#close">close()</a></li><li data-type='member'><a href="EggApplication.html#cluster">cluster()</a></li><li data-type='member'><a href="EggApplication.html#curl">curl()</a></li><li data-type='member'><a href="EggApplication.html#getLogger">getLogger()</a></li><li data-type='member'><a href="EggApplication.html#inspect">inspect()</a></li><li data-type='member'><a href="EggApplication.html#toAsyncFunction">toAsyncFunction()</a></li><li data-type='member'><a href="EggApplication.html#toPromise">toPromise()</a></li><li data-type='member'><a href="EggApplication.html#url">url()</a></li><li data-type='member'><a href="EggApplication.html#use">use()</a></li></ul></li><li><a href="EggCore.html">EggCore</a><ul class='members'><li data-type='member'><a href="EggCore.html#BaseContextClass">BaseContextClass</a></li><li data-type='member'><a href="EggCore.html#baseDir">baseDir</a></li><li data-type='member'><a href="EggCore.html#config">config</a></li><li data-type='member'><a href="EggCore.html#Controller">Controller</a></li><li data-type='member'><a href="EggCore.html#deprecate">deprecate</a></li><li data-type='member'><a href="EggCore.html#loader">loader</a></li><li data-type='member'><a href="EggCore.html#name">name</a></li><li data-type='member'><a href="EggCore.html#plugins">plugins</a></li><li data-type='member'><a href="EggCore.html#router">router</a></li><li data-type='member'><a href="EggCore.html#Service">Service</a></li><li data-type='member'><a href="EggCore.html#type">type</a></li><li data-type='member'><a href="EggCore.html#beforeClose">beforeClose()</a></li><li data-type='member'><a href="EggCore.html#beforeStart">beforeStart()</a></li><li data-type='member'><a href="EggCore.html#close">close()</a></li><li data-type='member'><a href="EggCore.html#toAsyncFunction">toAsyncFunction()</a></li><li data-type='member'><a href="EggCore.html#toPromise">toPromise()</a></li><li data-type='member'><a href="EggCore.html#url">url()</a></li><li data-type='member'><a href="EggCore.html#use">use()</a></li></ul></li><li><a href="EggLoader.html">EggLoader</a><ul class='members'><li data-type='member'><a href="EggLoader.html#appInfo">appInfo</a></li><li data-type='member'><a href="EggLoader.html#ContextLoader">ContextLoader</a></li><li data-type='member'><a href="EggLoader.html#eggPaths">eggPaths</a></li><li data-type='member'><a href="EggLoader.html#FileLoader">FileLoader</a></li><li data-type='member'><a href="EggLoader.html#pkg">pkg</a></li><li data-type='member'><a href="EggLoader.html#plugins">plugins</a></li><li data-type='member'><a href="EggLoader.html#serverEnv">serverEnv</a></li><li data-type='member'><a href="EggLoader.html#serverScope">serverScope</a></li><li data-type='member'><a href="EggLoader.html#getAppInfo">getAppInfo()</a></li><li data-type='member'><a href="EggLoader.html#getHomedir">getHomedir()</a></li><li data-type='member'><a href="EggLoader.html#getLoadUnits">getLoadUnits()</a></li><li data-type='member'><a href="EggLoader.html#loadAgentExtend">loadAgentExtend()</a></li><li data-type='member'><a href="EggLoader.html#loadApplicationExtend">loadApplicationExtend()</a></li><li data-type='member'><a href="EggLoader.html#loadConfig">loadConfig()</a></li><li data-type='member'><a href="EggLoader.html#loadContextExtend">loadContextExtend()</a></li><li data-type='member'><a href="EggLoader.html#loadFile">loadFile()</a></li><li data-type='member'><a href="EggLoader.html#loadHelperExtend">loadHelperExtend()</a></li><li data-type='member'><a href="EggLoader.html#loadMiddleware">loadMiddleware()</a></li><li data-type='member'><a href="EggLoader.html#loadPlugin">loadPlugin()</a></li><li data-type='member'><a href="EggLoader.html#loadRequestExtend">loadRequestExtend()</a></li><li data-type='member'><a href="EggLoader.html#loadResponseExtend">loadResponseExtend()</a></li><li data-type='member'><a href="EggLoader.html#loadRouter">loadRouter()</a></li><li data-type='member'><a href="EggLoader.html#loadService">loadService()</a></li><li data-type='member'><a href="EggLoader.html#loadToApp">loadToApp()</a></li><li data-type='member'><a href="EggLoader.html#loadToContext">loadToContext()</a></li></ul></li><li><a href="FileLoader.html">FileLoader</a><ul class='members'><li data-type='member'><a href="FileLoader.html#load">load()</a></li><li data-type='member'><a href="FileLoader.html#parse">parse()</a></li></ul></li><li><a href="Helper.html">Helper</a><ul class='members'><li data-type='member'><a href="Helper.html#pathFor">pathFor()</a></li><li data-type='member'><a href="Helper.html#urlFor">urlFor()</a></li></ul></li><li><a href="I18n.html">I18n</a></li><li><a href="Messenger.html">Messenger</a><ul class='members'><li data-type='member'><a href="Messenger.html#broadcast">broadcast()</a></li><li data-type='member'><a href="Messenger.html#send">send()</a></li><li data-type='member'><a href="Messenger.html#sendRandom">sendRandom()</a></li><li data-type='member'><a href="Messenger.html#sendTo">sendTo()</a></li><li data-type='member'><a href="Messenger.html#sendToAgent">sendToAgent()</a></li><li data-type='member'><a href="Messenger.html#sendToApp">sendToApp()</a></li></ul></li><li><a href="Request.html">Request</a><ul class='members'><li data-type='member'><a href="Request.html#acceptJSON">acceptJSON</a></li><li data-type='member'><a href="Request.html#header">header</a></li><li data-type='member'><a href="Request.html#headers">headers</a></li><li data-type='member'><a href="Request.html#host">host</a></li><li data-type='member'><a href="Request.html#ip">ip</a></li><li data-type='member'><a href="Request.html#ips">ips</a></li><li data-type='member'><a href="Request.html#method">method</a></li><li data-type='member'><a href="Request.html#originalUrl">originalUrl</a></li><li data-type='member'><a href="Request.html#path">path</a></li><li data-type='member'><a href="Request.html#protocol">protocol</a></li><li data-type='member'><a href="Request.html#queries">queries</a></li><li data-type='member'><a href="Request.html#query">query</a></li><li data-type='member'><a href="Request.html#querystring">querystring</a></li><li data-type='member'><a href="Request.html#url">url</a></li><li data-type='member'><a href="Request.html#query">query()</a></li></ul></li><li><a href="Response.html">Response</a><ul class='members'><li data-type='member'><a href="Response.html#realStatus">realStatus</a></li><li data-type='member'><a href="Response.html#type">type</a></li><li data-type='member'><a href="Response.html#type">type</a></li></ul></li><li><a href="Router.html">Router</a><ul class='members'><li data-type='member'><a href="Router.html#register">register()</a></li><li data-type='member'><a href="Router.html#resources">resources()</a></li><li data-type='member'><a href="Router.html#url">url()</a></li></ul></li><li><a href="global.html#Service">Service</a><ul class='members'><li data-type='member'><a href="global.html#Service#app">app</a></li><li data-type='member'><a href="global.html#Service#config">config</a></li><li data-type='member'><a href="global.html#Service#ctx">ctx</a></li><li data-type='member'><a href="global.html#Service#service">service</a></li></ul></li></ul><h3>Namespaces</h3><ul><li><a href="Egg.html">Egg</a><ul class='members'><li data-type='member'><a href="Egg.html#Agent">Agent</a></li><li data-type='member'><a href="Egg.html#AgentWorkerLoader">AgentWorkerLoader</a></li><li data-type='member'><a href="Egg.html#Application">Application</a></li><li data-type='member'><a href="Egg.html#AppWorkerLoader">AppWorkerLoader</a></li><li data-type='member'><a href="Egg.html#BaseContextClass">BaseContextClass</a></li><li data-type='member'><a href="Egg.html#Controller">Controller</a></li><li data-type='member'><a href="Egg.html#Service">Service</a></li><li data-type='member'><a href="Egg.html#Subscription">Subscription</a></li></ul></li></ul>
</nav>

<div id="main">
    
    <h1 class="page-title">EggLoader</h1>
    

    




<section>

<header>
    
        <h2>
        EggLoader
        </h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    <h4 class="name" id="EggLoader"><span class="type-signature"></span>new EggLoader<span class="signature">(options)</span><span class="type-signature"></span></h4>

    











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name">
                  
                  <code>options</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last"><p>options</p>
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name">
                  
                  <code>baseDir</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            <td class="description last"><p>the directory of application</p></td>
        </tr>

    

        <tr>
            
                <td class="name">
                  
                  <code>app</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="EggCore.html">EggCore</a></span>


            
            </td>

            

            <td class="description last"><p>Application instance</p></td>
        </tr>

    

        <tr>
            
                <td class="name">
                  
                  <code>logger</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">Logger</span>


            
            </td>

            

            <td class="description last"><p>logger</p></td>
        </tr>

    

        <tr>
            
                <td class="name">
                  
                    [
                  
                  <code>plugins</code>
                  
                  
                    ]
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last"><p>custom plugins</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line29">line 29</a>
    </li></ul></dd>
    

    

    

    
</dl>














    
    </div>

    

    

    

     

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="appInfo"><span class="type-signature"></span>appInfo<span class="type-signature"> :<a href="AppInfo.html">AppInfo</a></span></h4>








<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line82">line 82</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="ContextLoader"><span class="type-signature"></span>ContextLoader<span class="type-signature"> :<a href="ContextLoader.html">ContextLoader</a></span></h4>








<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line413">line 413</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="eggPaths"><span class="type-signature"></span>eggPaths<span class="type-signature"> :Array</span></h4>




<div class="description">
    <p>All framework directories.</p>
<p>You can extend Application of egg, the entry point is options.app,</p>
<p>loader will find all directories from the prototype of Application,
you should define <code>Symbol.for('egg#eggPath')</code> property.</p>
<pre class="prettyprint source"><code>// lib/example.js
const egg = require('egg');
class ExampleApplication extends egg.Application {
  constructor(options) {
    super(options);
  }

  get [Symbol.for('egg#eggPath')]() {
    return path.join(__dirname, '..');
  }
}</code></pre>
</div>





<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line46">line 46</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li>EggLoader#getEggPaths</li>
        </ul>
    </dd>
    

    
</dl>






        
            
<h4 class="name" id="FileLoader"><span class="type-signature"></span>FileLoader<span class="type-signature"> :<a href="FileLoader.html">FileLoader</a></span></h4>








<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line405">line 405</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="pkg"><span class="type-signature"></span>pkg<span class="type-signature"> :Object</span></h4>








<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line39">line 39</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="AppInfo.html#pkg">AppInfo#pkg</a></li>
        </ul>
    </dd>
    

    
</dl>






        
            
<h4 class="name" id="plugins"><span class="type-signature"></span>plugins<span class="type-signature"> :Object</span></h4>




<div class="description">
    <p>Retrieve enabled plugins</p>
</div>





<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_plugin.js.html">node_modules/egg-core/lib/loader/mixin/plugin.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_plugin.js.html#line135">line 135</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="serverEnv"><span class="type-signature"></span>serverEnv<span class="type-signature"> :String</span></h4>








<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line74">line 74</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="AppInfo.html#env">AppInfo#env</a></li>
        </ul>
    </dd>
    

    
</dl>






        
            
<h4 class="name" id="serverScope"><span class="type-signature"></span>serverScope<span class="type-signature"> :String</span></h4>








<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line88">line 88</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li>AppInfo#serverScope</li>
        </ul>
    </dd>
    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id="getAppInfo"><span class="type-signature"></span>getAppInfo<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="AppInfo.html">AppInfo</a>}</span></h4>

    



<div class="description">
    <p>Get app info</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line168">line 168</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="getHomedir"><span class="type-signature"></span>getHomedir<span class="signature">()</span><span class="type-signature"> &rarr; {String}</span></h4>

    



<div class="description">
    <p>Get home directory</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>3.4.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line158">line 158</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="getLoadUnits"><span class="type-signature"></span>getLoadUnits<span class="signature">()</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    <p>Get all loadUnit</p>
<p>loadUnit is a directory that can be loaded by EggLoader, it has the same structure.
loadUnit has a path and a type(app, framework, plugin).</p>
<p>The order of the loadUnits:</p>
<ol>
<li>plugin</li>
<li>framework</li>
<li>app</li>
</ol>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line330">line 330</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadAgentExtend"><span class="type-signature"></span>loadAgentExtend<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>mixin Agent.prototype</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html">node_modules/egg-core/lib/loader/mixin/extend.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html#line16">line 16</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadApplicationExtend"><span class="type-signature"></span>loadApplicationExtend<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>mixin Application.prototype</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html">node_modules/egg-core/lib/loader/mixin/extend.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html#line25">line 25</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadConfig"><span class="type-signature"></span>loadConfig<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>Load config/config.js</p>
<p>Will merge config.default.js 和 config.${env}.js</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_config.js.html">node_modules/egg-core/lib/loader/mixin/config.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_config.js.html#line13">line 13</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadContextExtend"><span class="type-signature"></span>loadContextExtend<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>mixin Context.prototype</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html">node_modules/egg-core/lib/loader/mixin/extend.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html#line52">line 52</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadFile"><span class="type-signature"></span>loadFile<span class="signature">(filepath, arguments)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    <p>Load single file, will invoke when export is function</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name">
                  
                  <code>filepath</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            <td class="description last"><p>fullpath</p></td>
        </tr>

    

        <tr>
            
                <td class="name">
                  
                  <code>arguments</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            <td class="description last"><p>pass rest arguments into the function when invoke</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line289">line 289</a>
    </li></ul></dd>
    

    

    

    
</dl>













    <h5>Example</h5>
    
    <pre class="prettyprint"><code>```js
app.loader.loadFile(path.join(app.options.baseDir, 'config/router.js'));
```</code></pre>



        
            

    

    <h4 class="name" id="loadHelperExtend"><span class="type-signature"></span>loadHelperExtend<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>mixin app.Helper.prototype</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html">node_modules/egg-core/lib/loader/mixin/extend.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html#line61">line 61</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadMiddleware"><span class="type-signature"></span>loadMiddleware<span class="signature">(opt)</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>Load app/middleware</p>
<p>app.config.xx is the options of the middleware xx that has same name as config</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name">
                  
                  <code>opt</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last"><p>LoaderOptions</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_middleware.js.html">node_modules/egg-core/lib/loader/mixin/middleware.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_middleware.js.html#line14">line 14</a>
    </li></ul></dd>
    

    

    

    
</dl>













    <h5>Example</h5>
    
    <pre class="prettyprint"><code>```js
// app/middleware/status.js
module.exports = function(options, app) {
  // options == app.config.status
  return function*(next) {
    yield next;
  }
}
```</code></pre>



        
            

    

    <h4 class="name" id="loadPlugin"><span class="type-signature"></span>loadPlugin<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>Load config/plugin.js from {EggLoader#loadUnits}</p>
<p>plugin.js is written below</p>
<pre class="prettyprint source lang-js"><code>{
  'xxx-client': {
    enable: true,
    package: 'xxx-client',
    dep: [],
    env: [],
  },
  // short hand
  'rds': false,
  'depd': {
    enable: true,
    path: 'path/to/depd'
  }
}</code></pre><p>If the plugin has path, Loader will find the module from it.</p>
<p>Otherwise Loader will lookup follow the order by packageName</p>
<ol>
<li>$APP_BASE/node_modules/${package}</li>
<li>$EGG_BASE/node_modules/${package}</li>
</ol>
<p>You can call <code>loader.plugins</code> that retrieve enabled plugins.</p>
<pre class="prettyprint source lang-js"><code>loader.plugins['xxx-client'] = {
  name: 'xxx-client',                 // the plugin name, it can be used in `dep`
  package: 'xxx-client',              // the package name of plugin
  enable: true,                       // whether enabled
  path: 'path/to/xxx-client',         // the directory of the plugin package
  dep: [],                            // the dependent plugins, you can use the plugin name
  env: [ 'local', 'unittest' ],       // specify the serverEnv that only enable the plugin in it
}</code></pre><p><code>loader.allPlugins</code> can be used when retrieve all plugins.</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_plugin.js.html">node_modules/egg-core/lib/loader/mixin/plugin.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_plugin.js.html#line12">line 12</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadRequestExtend"><span class="type-signature"></span>loadRequestExtend<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>mixin Request.prototype</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html">node_modules/egg-core/lib/loader/mixin/extend.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html#line34">line 34</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadResponseExtend"><span class="type-signature"></span>loadResponseExtend<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>mixin Response.prototype</p>
</div>













<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html">node_modules/egg-core/lib/loader/mixin/extend.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_extend.js.html#line43">line 43</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadRouter"><span class="type-signature"></span>loadRouter<span class="signature">(opt)</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>Load app/router.js</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name">
                  
                  <code>opt</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last"><p>LoaderOptions</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_router.js.html">node_modules/egg-core/lib/loader/mixin/router.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_router.js.html#line8">line 8</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadService"><span class="type-signature"></span>loadService<span class="signature">(opt)</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>Load app/service</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name">
                  
                  <code>opt</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last"><p>LoaderOptions</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_mixin_service.js.html">node_modules/egg-core/lib/loader/mixin/service.js</a>, <a href="node_modules_egg-core_lib_loader_mixin_service.js.html#line8">line 8</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadToApp"><span class="type-signature"></span>loadToApp<span class="signature">(directory, property, opt)</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>Load files using <a href="FileLoader.html">FileLoader</a>, inject to <a href="Application.html">Application</a></p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name">
                  
                  <code>directory</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Array</span>


            
            </td>

            

            <td class="description last"><p>see <a href="FileLoader.html">FileLoader</a></p></td>
        </tr>

    

        <tr>
            
                <td class="name">
                  
                  <code>property</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            <td class="description last"><p>see <a href="FileLoader.html">FileLoader</a></p></td>
        </tr>

    

        <tr>
            
                <td class="name">
                  
                  <code>opt</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last"><p>see <a href="FileLoader.html">FileLoader</a></p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line371">line 371</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
            

    

    <h4 class="name" id="loadToContext"><span class="type-signature"></span>loadToContext<span class="signature">(directory, property, opt)</span><span class="type-signature"></span></h4>

    



<div class="description">
    <p>Load files using <a href="ContextLoader.html">ContextLoader</a></p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name">
                  
                  <code>directory</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Array</span>


            
            </td>

            

            <td class="description last"><p>see <a href="ContextLoader.html">ContextLoader</a></p></td>
        </tr>

    

        <tr>
            
                <td class="name">
                  
                  <code>property</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            <td class="description last"><p>see <a href="ContextLoader.html">ContextLoader</a></p></td>
        </tr>

    

        <tr>
            
                <td class="name">
                  
                  <code>opt</code>
                  
                  
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last"><p>see <a href="ContextLoader.html">ContextLoader</a></p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    
    <dt class="tag-since">Since:</dt>
    <dd class="tag-since"><ul class="dummy"><li>1.0.0</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="node_modules_egg-core_lib_loader_egg_loader.js.html">node_modules/egg-core/lib/loader/egg_loader.js</a>, <a href="node_modules_egg-core_lib_loader_egg_loader.js.html#line392">line 392</a>
    </li></ul></dd>
    

    

    

    
</dl>














        
    

    

    
</article>

</section>




</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 08:57:05 GMT+0000 (UTC) using the Minami theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>